waxClass{"MyActivity", TWBaseActivity, 
  protocols = {"IBActionSheetDelegate", "UITableViewDelegate", "UITableViewDataSource", "UMSocialUIDelegate"}}

function init(self)
  self:ORIGinit()

  if (self) then
    self:setTitle("我的客户管家")
  end

  return self
end

function onCreateViews(self)
  self.super:onCreateViews()
  self:setRightItem()
end

function viewDidAppear(self, animated)
  self.super:viewDidAppear(animated)
end

function setRightItem(self)
  local addItem = UIBarButtonItem:initWithImage_style_target_action(UIImage:imageNamed("top_add.png"), UIBarButtonItemStylePlain, self, "addItem")
  local searchItem = UIBarButtonItem:initWithImage_style_target_action(UIImage:imageNamed("top_search.png"), UIBarButtonItemStylePlain, self, "addItem")  
  addItem:setTintColor(UIColor:whiteColor())
  searchItem:setTintColor(UIColor:whiteColor())

  self:navigationItem():setRightBarButtonItems({addItem, searchItem})
end

function addItem(self)
end

function numberOfSectionsInTableView(self, tableView)
  local rows = self:ORIGnumberOfSectionsInTableView(tableView)
  return rows + 2
end

function tableView_numberOfRowsInSection(self, tableView, section)
  local rows = self:ORIGtableView_numberOfRowsInSection(tableView, section)
  if (section > 4) then
    rows = 2
  end

  return rows
end